import { CollectionReference } from "firebase/firestore"; import { ICollectionQuery, ICollection, IDocumentRef } from "./types"; import Entity from "./Entity"; import Query from "./Query"; /** * Firestorm representation of a collection reference. * @typeparam T The entity for the collection documents. * @typeparam P The entity for the collection parent. */ export declare class CollectionClass//eslint-disable-next-line @typescript-eslint/indent implements ICollection { /** * @hidden */ private _Entity; /** * @hidden */ private _native; /** * @hidden */ private _path; /** * @hidden */ private _parent; /** * Create a collection reference from an [[Entity]] and optional parent. * @param E The entity class for the collections documents. * @param parent The parent document for the collection. */ constructor(E: new () => T, parent?: IDocumentRef

); /** * The path to this collection. */ get path(): string; /** * The parent document reference for the collection. */ get parent(): IDocumentRef

| null; /** * The native firestore collection reference. */ get native(): CollectionReference; /** * @hidden * Creates the path to the collection. */ private buildPath; /** * @hidden * Creates the native firestore reference. */ private buildNative; /** * Gets a document reference from the collection. * @param id The document ID. */ doc(id: string): IDocumentRef; /** * Gets a document with a provided ID * @param id The ID of the document. * * @returns The entity. */ get(id: string): Promise; /** * Updates a document from an entity instance. * @param entity The entity (with ID) to update. * * @returns The updated entity. */ update(entity: T): Promise; /** * Creates a new document from an entity instance. * @param entity An instance of the entity. * * @returns The created entity. */ create(entity: T): Promise; find(query?: ICollectionQuery): Promise; /** * Removes a document from the collection. * @param id The document ID to remove. */ remove(id: string): Promise; /** * Entry point for building queries. */ query(): Query; } declare const _default: (model: new () => T, parent?: IDocumentRef

| undefined) => ICollection; /** * Collection factory * @returns A collection reference. */ export default _default;